<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/include/context.jsp"%>
<script type="text/javascript">

	function change() {
		var controls = document.getElementsByTagName("input").value;
		var i=0;
		for ( var i = 0; i < controls.length; i++) {
			if (controls[i].type == 'text') {

				controls[i].value = "不能为空！"; //给指定的text添加value          };
				i++;
			}
		}
		if(i>0){
			return false;
		}else{
			return true;
		}
	}
</script>
<form id="form1"
	action="${ctx}/system/userinfo/${empty user || empty user.id ?'save':'update' }"
	method="post" style="margin: 0px;"
	onSubmit="change()">

	<input type="hidden" name="user.id" value="${user.id}"/>
	<c:if test="${!empty user && null != user.id}">
		<input type="hidden" name="user.userPass" value="${user.userPass }" />
	</c:if>
	<table cellspacing="0" cellpadding="0" class="form-grid">
		<tbody>
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户名：</td>
				<td><input id="user.userName" type="text" name="user.userName"
					value="${user.userName}" size="15" /></td>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户Id：</td>
				<td><input type="text" name="user.userId"
					value="${user.userId}" size="15" /></td>
			</tr>
			<c:if test="${empty user || empty user.id}">
				<tr>
					<td style="text-align: right; padding-right: 3px; width: 30%;">用户密码：</td>
					<td colspan="3"><input type="password" name="user.userPass"
						value="${user.userPass}" size="15" dataType="Require" msg="" /></td>
				</tr>
			</c:if>


			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">email：</td>
				<td><input type="text" name="user.email" value="${user.email}"
					size="15" dataType="Email" msg="" /></td>
				<td style="text-align: right; padding-right: 3px; width: 30%;">联系电话：</td>
				<td><input type="text" name="user.phoneNumber"
					value="${user.phoneNumber}" size="15" /></td>
			</tr>

			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">内容：</td>
				<td><input type="text" name="user.userDesc"
					value="${user.userDesc}" size="15" /></td>
				<td style="text-align: right; padding-right: 3px; width: 30%;">组织：</td>
				<td><select name="user.department">
						<c:forEach var="department" items="${departmentList}"
							varStatus="status">
							<option value=${department.id }>${
								department.departname}</option>
						</c:forEach>
				</select></td>

			</tr>

			<tr>
				<td></td>
				<td colspan="3"></td>
			</tr>
		</tbody>
	</table>

	<div class="window_footer">
		<input type="submit" value="确定">
	</div>
</form>




